Integrand size = 17, antiderivative size = 43 \[ \int \cos ^2(a+b x) \cot ^3(a+b x) \, dx=-\frac {\csc ^2(a+b x)}{2 b}-\frac {2 \log (\sin (a+b x))}{b}+\frac {\sin ^2(a+b x)}{2 b} \]
Time = 0.05 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.81 \[ \int \cos ^2(a+b x) \cot ^3(a+b x) \, dx=-\frac {\csc ^2(a+b x)+4 \log (\sin (a+b x))-\sin ^2(a+b x)}{2 b} \]
Time = 0.23 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.77, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.353, Rules used = {3042, 25, 3070, 243, 49, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^2(a+b x) \cot ^3(a+b x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\sin \left (a+b x+\frac {\pi }{2}\right )^2 \tan \left (a+b x+\frac {\pi }{2}\right )^3dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \sin \left (\frac {1}{2} (2 a+\pi )+b x\right )^2 \tan \left (\frac {1}{2} (2 a+\pi )+b x\right )^3dx\) |
\(\Big \downarrow \) 3070 |
\(\displaystyle \frac {\int -\csc ^3(a+b x) \left (1-\sin ^2(a+b x)\right )^2d(-\sin (a+b x))}{b}\) |
\(\Big \downarrow \) 243 |
\(\displaystyle \frac {\int \csc ^2(a+b x) (\sin (a+b x)+1)^2d\sin ^2(a+b x)}{2 b}\) |
\(\Big \downarrow \) 49 |
\(\displaystyle \frac {\int \left (\csc ^2(a+b x)+2 \csc (a+b x)+1\right )d\sin ^2(a+b x)}{2 b}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\sin ^2(a+b x)+\csc (a+b x)-2 \log \left (\sin ^2(a+b x)\right )}{2 b}\) |
3.2.47.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int [ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[m, 0] && IGtQ[m + n + 2, 0]
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[1/2 Subst[In t[x^((m - 1)/2)*(a + b*x)^p, x], x, x^2], x] /; FreeQ[{a, b, m, p}, x] && I ntegerQ[(m - 1)/2]
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Simp[-f^(-1) Subst[Int[(1 - x^2)^((m + n - 1)/2)/x^n, x], x, Cos[e + f *x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n - 1)/2]
Time = 0.14 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.23
method | result | size |
derivativedivides | \(\frac {-\frac {\cos ^{6}\left (b x +a \right )}{2 \sin \left (b x +a \right )^{2}}-\frac {\left (\cos ^{4}\left (b x +a \right )\right )}{2}-\left (\cos ^{2}\left (b x +a \right )\right )-2 \ln \left (\sin \left (b x +a \right )\right )}{b}\) | \(53\) |
default | \(\frac {-\frac {\cos ^{6}\left (b x +a \right )}{2 \sin \left (b x +a \right )^{2}}-\frac {\left (\cos ^{4}\left (b x +a \right )\right )}{2}-\left (\cos ^{2}\left (b x +a \right )\right )-2 \ln \left (\sin \left (b x +a \right )\right )}{b}\) | \(53\) |
risch | \(2 i x -\frac {{\mathrm e}^{2 i \left (b x +a \right )}}{8 b}-\frac {{\mathrm e}^{-2 i \left (b x +a \right )}}{8 b}+\frac {4 i a}{b}+\frac {2 \,{\mathrm e}^{2 i \left (b x +a \right )}}{b \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )^{2}}-\frac {2 \ln \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )}{b}\) | \(85\) |
parallelrisch | \(\frac {16 \ln \left (\sec ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )-16 \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )\right )+\left (-8 \cos \left (b x +a \right )+2 \cos \left (2 b x +2 a \right )+2\right ) \left (\cot ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )+\left (-\left (\sec ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )+4\right ) \left (\csc ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{8 b}\) | \(93\) |
norman | \(\frac {-\frac {1}{8 b}-\frac {\tan ^{8}\left (\frac {b x}{2}+\frac {a}{2}\right )}{8 b}+\frac {9 \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{4 b}}{\left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )^{2} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}}-\frac {2 \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}+\frac {2 \ln \left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}\) | \(101\) |
Time = 0.32 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.42 \[ \int \cos ^2(a+b x) \cot ^3(a+b x) \, dx=-\frac {2 \, \cos \left (b x + a\right )^{4} - 3 \, \cos \left (b x + a\right )^{2} + 8 \, {\left (\cos \left (b x + a\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \sin \left (b x + a\right )\right ) - 1}{4 \, {\left (b \cos \left (b x + a\right )^{2} - b\right )}} \]
-1/4*(2*cos(b*x + a)^4 - 3*cos(b*x + a)^2 + 8*(cos(b*x + a)^2 - 1)*log(1/2 *sin(b*x + a)) - 1)/(b*cos(b*x + a)^2 - b)
Leaf count of result is larger than twice the leaf count of optimal. 614 vs. \(2 (34) = 68\).
Time = 1.33 (sec) , antiderivative size = 614, normalized size of antiderivative = 14.28 \[ \int \cos ^2(a+b x) \cot ^3(a+b x) \, dx=\begin {cases} \frac {16 \log {\left (\tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 1 \right )} \tan ^{6}{\left (\frac {a}{2} + \frac {b x}{2} \right )}}{8 b \tan ^{6}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 16 b \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 8 b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )}} + \frac {32 \log {\left (\tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 1 \right )} \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )}}{8 b \tan ^{6}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 16 b \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 8 b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )}} + \frac {16 \log {\left (\tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 1 \right )} \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )}}{8 b \tan ^{6}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 16 b \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 8 b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )}} - \frac {16 \log {\left (\tan {\left (\frac {a}{2} + \frac {b x}{2} \right )} \right )} \tan ^{6}{\left (\frac {a}{2} + \frac {b x}{2} \right )}}{8 b \tan ^{6}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 16 b \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 8 b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )}} - \frac {32 \log {\left (\tan {\left (\frac {a}{2} + \frac {b x}{2} \right )} \right )} \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )}}{8 b \tan ^{6}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 16 b \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 8 b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )}} - \frac {16 \log {\left (\tan {\left (\frac {a}{2} + \frac {b x}{2} \right )} \right )} \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )}}{8 b \tan ^{6}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 16 b \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 8 b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )}} - \frac {\tan ^{8}{\left (\frac {a}{2} + \frac {b x}{2} \right )}}{8 b \tan ^{6}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 16 b \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 8 b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )}} + \frac {18 \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )}}{8 b \tan ^{6}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 16 b \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 8 b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )}} - \frac {1}{8 b \tan ^{6}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 16 b \tan ^{4}{\left (\frac {a}{2} + \frac {b x}{2} \right )} + 8 b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )}} & \text {for}\: b \neq 0 \\\frac {x \cos ^{5}{\left (a \right )}}{\sin ^{3}{\left (a \right )}} & \text {otherwise} \end {cases} \]
Piecewise((16*log(tan(a/2 + b*x/2)**2 + 1)*tan(a/2 + b*x/2)**6/(8*b*tan(a/ 2 + b*x/2)**6 + 16*b*tan(a/2 + b*x/2)**4 + 8*b*tan(a/2 + b*x/2)**2) + 32*l og(tan(a/2 + b*x/2)**2 + 1)*tan(a/2 + b*x/2)**4/(8*b*tan(a/2 + b*x/2)**6 + 16*b*tan(a/2 + b*x/2)**4 + 8*b*tan(a/2 + b*x/2)**2) + 16*log(tan(a/2 + b* x/2)**2 + 1)*tan(a/2 + b*x/2)**2/(8*b*tan(a/2 + b*x/2)**6 + 16*b*tan(a/2 + b*x/2)**4 + 8*b*tan(a/2 + b*x/2)**2) - 16*log(tan(a/2 + b*x/2))*tan(a/2 + b*x/2)**6/(8*b*tan(a/2 + b*x/2)**6 + 16*b*tan(a/2 + b*x/2)**4 + 8*b*tan(a /2 + b*x/2)**2) - 32*log(tan(a/2 + b*x/2))*tan(a/2 + b*x/2)**4/(8*b*tan(a/ 2 + b*x/2)**6 + 16*b*tan(a/2 + b*x/2)**4 + 8*b*tan(a/2 + b*x/2)**2) - 16*l og(tan(a/2 + b*x/2))*tan(a/2 + b*x/2)**2/(8*b*tan(a/2 + b*x/2)**6 + 16*b*t an(a/2 + b*x/2)**4 + 8*b*tan(a/2 + b*x/2)**2) - tan(a/2 + b*x/2)**8/(8*b*t an(a/2 + b*x/2)**6 + 16*b*tan(a/2 + b*x/2)**4 + 8*b*tan(a/2 + b*x/2)**2) + 18*tan(a/2 + b*x/2)**4/(8*b*tan(a/2 + b*x/2)**6 + 16*b*tan(a/2 + b*x/2)** 4 + 8*b*tan(a/2 + b*x/2)**2) - 1/(8*b*tan(a/2 + b*x/2)**6 + 16*b*tan(a/2 + b*x/2)**4 + 8*b*tan(a/2 + b*x/2)**2), Ne(b, 0)), (x*cos(a)**5/sin(a)**3, True))
Time = 0.19 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.81 \[ \int \cos ^2(a+b x) \cot ^3(a+b x) \, dx=\frac {\sin \left (b x + a\right )^{2} - \frac {1}{\sin \left (b x + a\right )^{2}} - 2 \, \log \left (\sin \left (b x + a\right )^{2}\right )}{2 \, b} \]
Leaf count of result is larger than twice the leaf count of optimal. 187 vs. \(2 (39) = 78\).
Time = 0.35 (sec) , antiderivative size = 187, normalized size of antiderivative = 4.35 \[ \int \cos ^2(a+b x) \cot ^3(a+b x) \, dx=\frac {\frac {{\left (\frac {8 \, {\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} + 1\right )} {\left (\cos \left (b x + a\right ) + 1\right )}}{\cos \left (b x + a\right ) - 1} + \frac {\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} + \frac {8 \, {\left (\frac {4 \, {\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} - \frac {3 \, {\left (\cos \left (b x + a\right ) - 1\right )}^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} - 3\right )}}{{\left (\frac {\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} - 1\right )}^{2}} - 8 \, \log \left (\frac {{\left | -\cos \left (b x + a\right ) + 1 \right |}}{{\left | \cos \left (b x + a\right ) + 1 \right |}}\right ) + 16 \, \log \left ({\left | -\frac {\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} + 1 \right |}\right )}{8 \, b} \]
1/8*((8*(cos(b*x + a) - 1)/(cos(b*x + a) + 1) + 1)*(cos(b*x + a) + 1)/(cos (b*x + a) - 1) + (cos(b*x + a) - 1)/(cos(b*x + a) + 1) + 8*(4*(cos(b*x + a ) - 1)/(cos(b*x + a) + 1) - 3*(cos(b*x + a) - 1)^2/(cos(b*x + a) + 1)^2 - 3)/((cos(b*x + a) - 1)/(cos(b*x + a) + 1) - 1)^2 - 8*log(abs(-cos(b*x + a) + 1)/abs(cos(b*x + a) + 1)) + 16*log(abs(-(cos(b*x + a) - 1)/(cos(b*x + a ) + 1) + 1)))/b
Time = 0.21 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.44 \[ \int \cos ^2(a+b x) \cot ^3(a+b x) \, dx=\frac {\ln \left ({\mathrm {tan}\left (a+b\,x\right )}^2+1\right )}{b}-\frac {2\,\ln \left (\mathrm {tan}\left (a+b\,x\right )\right )}{b}-\frac {{\mathrm {tan}\left (a+b\,x\right )}^2+\frac {1}{2}}{b\,\left ({\mathrm {tan}\left (a+b\,x\right )}^4+{\mathrm {tan}\left (a+b\,x\right )}^2\right )} \]